<template>
  <div>
    <input type="file" class="upload-file" ref="referenceFile">
    <input v-model="test.name" >
    <button @click="uploadReferenceFile" >上你大爷传</button>
  </div>
</template>

<script>
  import { teacherUpload } from '../../api/getData'
  export default {
    data(){
      return {
        test:{
          name:null
        }
      }
    },
    name: 'testTeahcerUpload',
    methods:{

      uploadReferenceFile () {
        this.test.referenceFile=this.$refs.referenceFile.files[0];
        teacherUpload(this.test);
      }
    }
  }
</script>

<style scoped>

</style>
